package org.oimwrapper.connectors.genericldap;import java.security.*;import java.util.*;import javax.naming.ldap.*;/** * Creates an ldap connection that can be called from a JAAS login. */public class OIMLdapPrivilegedConnection implements PrivilegedAction {	/**	 * The environment for the constructor	 */	protected Hashtable environment;	/**	 * Default constructor.	 *	 * @param Environment The environment to use connecting to the ldap server.	 */	public OIMLdapPrivilegedConnection(Hashtable Environment) {		environment = Environment;	}	/**	 * Called to create a new ldap connection using the privileged session.	 *	 * @return The ldap connection created in the priviledge context.	 */	public Object run() {		LdapContext directory = null;		try {			directory = new OIMLdapSerializableContext(environment, null);		} catch (Exception e) { ; }		return directory;	}}